package com.hch.datastructure.linkedlist;

public class DoubleLinkedList {
    private DoubleNode head = new DoubleNode(0, null);

    public DoubleNode getHead() {
        return head;
    }

    public void add(DoubleNode doubleNode) {
        DoubleNode temp = head;
        while (true) {
            if (temp.getNext() == null) {
                break;
            }
            temp = head.getNext();
        }
        temp.setNext(doubleNode);
        doubleNode.setPre(temp);
    }
}
